#!/usr/bin/env bash

# ----------------------------------------------------------------------
# Filename:   01-history-lv4.sh
# Version:    1.0
# Date:       2020/04/23
# Author:     Lz
# Email:      lz843723683@163.com
# History：     
#             Version 1.0, 2020/04/22
# Function:   packages - 01.测试安全四级-默认服务和软件包
# Out:        
#              0 => TPASS
#              1 => TFAIL
#              other=> TCONF
# ----------------------------------------------------------------------

## TODO : 测试收尾清除工作
#
HistoryClean_FTLV4(){
	return $TPASS
}


## TODO: 调用程序退出函数
#    In: $1 => 调用脚本结果值
HistoryExit_FTLV4(){
        # 调用退出函数，其中调用了clean相关函数
	Exit_FTLIB ${1}
}


## TODO: 用户界面
#
HistoryUSAGE_FTLV4(){
	USAGE_FTLIB "安全四级测试 - 命令历史记录"
}


## TODO : 测试前的初始化 
#  Out  : 
#         0 => TPASS
#         1 => TFAIL
#         other=> TCONF
HistoryInit_FTLV4(){
        # 调用初始化函数
	Init_FTLIB "HistoryClean_FTLV4"
        # 调用用户界面函数
 	HistoryUSAGE_FTLV4
}


## TODO ：默认安装 kylin-history
#
HistoryTest01_FTLV4(){
        local pkgname="kylin-history"

        # 默认安装 kylin-history
        PkgExist_FTLIB "isExist" "no" "yes" "${pkgname}"
        RetParse_FTLIB "默认安装 ${pkgname} 相关包" "False"
}


## TODO : Main
#  Out  : 
#         0 => TPASS
#         1 => TFAIL
#         other => TCONF
HistoryMain_FTLV4(){
	HistoryInit_FTLV4

	HistoryTest01_FTLV4

	return ${TPASS}	
}

HistoryMain_FTLV4
HistoryExit_FTLV4 $?
